<script type="text/javascript">

$(function() {
    @if (count($errors) > 0)
    $.alert("{{ $errors->first() }}");
    @endif

    @if(Session::get('msg')) 
    $.toast("{{ Session::get('msg') }}", function() {});    
    @endif
});

</script>